package com.sun.personal.controller;

import com.sun.bean.SysUser;
import com.sun.domain.Result;
import com.sun.personal.service.SysUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;


/**
 * @author syh
 * @date 2021/7/3 11:56
 */
@RestController
public class SysUserController {
    @Resource
    private SysUserService sysUserService;

    @RequestMapping("/list")
    public Result findAll(){
        Result result = new Result();
        List<SysUser> userList = sysUserService.findSysUserAll();
        result.setData(userList);
        result.setMessage("获取消息成功！");
        return result;
    }
}

